<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增产奶记录')" />
	<th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-ncCowsMilk-add">
			<div class="form-group">

				<label class="col-sm-3 control-label">耳号：</label>
				<div class="col-sm-8">
					<select id="cowId" class="form-control select2-multiple"  name="cowId" >
						<option th:each="user:${milk}"  th:text="${user.cowId}"></option>
					</select>
				</div>

				<!--<div class="col-sm-8">
					<input id="cowId" name="cowId" class="form-control" type="number">
				</div>-->
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">产奶数量（kg）：</label>
				<div class="col-sm-8">
					<input id="milkAmount" name="milkAmount" class="form-control" type="number">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">日期：</label>
				<div class="col-sm-8">
					<input id="createTime" data-format="yyyy-MM-dd HH:mm:ss" data-type="datetime" required readonly="readonly" name="createTime" placeholder="请选择时间"  th:value="*{#dates.format(new java.util.Date().getTime(), 'yyyy-MM-dd HH:mm:ss')}" class="form-control" type="text" th:class="time-input" >

					<!--<input id="createTime" name="createTime" class="form-control" type="text">-->
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">时间段：</label>  <!--：1 ：早 2：晚：-->
				<div class="col-sm-8">
					<select name="timeStage" class="form-control m-b" th:with="type=${@dict.getType('TimeSlot')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" ></option>

					</select>

					<!--<input id="timeStage" name="timeStage" class="form-control" type="text">-->
				</div>
			</div>
			<!--<div class="form-group">
				<label class="col-sm-3 control-label">创建时间：</label>
				<div class="col-sm-8">
					<input id="createTime" name="createTime" class="form-control" type="text">
				</div>
			</div>-->
			<div class="form-group">
				<label class="col-sm-3 control-label">创建者：</label>
				<div class="col-sm-8">
					<select id="createBy" class="form-control select2-multiple" name="createBy" >
						<option th:each="user:${user}" th:value="${user.userId}" th:text="${user.userName}" th:disabled="${user.status == '1'}"></option>
					</select>

					<!--<input id="createBy" name="createBy" class="form-control" type="text">-->
				</div>
			</div>
			<!--<div class="form-group">
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<input id="remark" name="remark" class="form-control" type="text">
				</div>
			</div>-->
		</form>
	</div>
    <div th:include="include::footer"></div>
	<th:block th:include="include :: select2-js" />
    <script type="text/javascript">
		var prefix = ctx + "system/ncCowsMilk"
		$("#form-ncCowsMilk-add").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});

		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-ncCowsMilk-add').serialize());
	        }
	    }
	</script>
</body>
</html>
